package com.spic.business.plan.book.mapper;

import java.util.List;

import com.spic.business.plan.book.domain.PlanStandingBook;
import com.spic.business.plan.book.domain.PlanStandingBookEmergencyMeasure;
import com.spic.business.plan.book.domain.PlanStandingBookGoods;
import org.apache.ibatis.annotations.Param;

/**
 * 应急预案台账Mapper接口
 *
 * @author spic
 * @date 2021-10-28
 */
public interface PlanStandingBookMapper {
    /**
     * 查询应急预案台账
     *
     * @param id 应急预案台账主键
     * @return 应急预案台账
     */
    public PlanStandingBook selectPlanStandingBookById(Long id);

    /**
     * 查询应急预案台账列表
     *
     * @param planStandingBook 应急预案台账
     * @return 应急预案台账集合
     */
    public List<PlanStandingBook> selectPlanStandingBookList(PlanStandingBook planStandingBook);

    /**
     * 新增应急预案台账
     *
     * @param planStandingBook 应急预案台账
     * @return 结果
     */
    public int insertPlanStandingBook(PlanStandingBook planStandingBook);

    /**
     * 修改应急预案台账
     *
     * @param planStandingBook 应急预案台账
     * @return 结果
     */
    public int updatePlanStandingBook(PlanStandingBook planStandingBook);

    /**
     * 删除应急预案台账
     *
     * @param id 应急预案台账主键
     * @return 结果
     */
    public int deletePlanStandingBookById(Long id);

    /**
     * 批量删除应急预案台账
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePlanStandingBookByIds(Long[] ids);

    /**
     * 批量删除预案台账—紧急处理措施
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePlanStandingBookEmergencyMeasureByIds(Long[] ids);

    /**
     * 批量新增预案台账—紧急处理措施
     *
     * @param planStandingBookEmergencyMeasureList 预案台账—紧急处理措施列表
     * @return 结果
     */
    public int batchPlanStandingBookEmergencyMeasure(List<PlanStandingBookEmergencyMeasure> planStandingBookEmergencyMeasureList);

    /**
     * 批量新增应急物资
     *
     * @param PlanStandingBookGoodsList 应急物资
     * @return 结果
     */
    public int batchPlanStandingBookGoods(List<PlanStandingBookGoods> PlanStandingBookGoodsList);


    /**
     * 通过应急预案台账主键删除预案台账—紧急处理措施信息
     *
     * @param id 应急预案台账ID
     * @return 结果
     */
    public int deletePlanStandingBookEmergencyMeasureByPlanStandingBookId(Long id);

    /**
     * 根据主表id获取关联子表
     *
     * @param id
     * @return
     */
    List<PlanStandingBookGoods> selectGoodsById(Long id);

    /**
     * 通过应急预案台账主键删除预案台账—紧急处理措施信息
     *
     * @param id 应急预案台账ID
     * @return 结果
     */
    public int deleteGoodsByBookIds(@Param("ids") Long[] ids);
}
